
#include "../ui.h"
#include "../app_includes.h"

#define PLATE_TAB_NUM      (1)


static lv_obj_t *ui_screen;
static lv_obj_t *ui_tabview;
static lv_obj_t *ui_tab[PLATE_TAB_NUM];
static lv_timer_t *lv_timer;

static void plate_tab0_screen_create(lv_obj_t *tab);
static void plate_tab0_refresh(lv_timer_t *timer);
static void set_value_event_cb(lv_event_t * e);
static void power_select_refresh(void);
static void short_key_refresh(lv_obj_t *tab);
static void select_shortkey_event_cb(lv_event_t * e);
static void select_shortkey_back_event_cb(lv_event_t * e);

void lv_plate_close(void)
{
    lv_timer_del(lv_timer);
}

//app应用入口 
lv_obj_t *lv_plate_open(lv_obj_t *screen)
{
    ui_tabview = lv_tab_screen_create(screen, ui_tab, PLATE_TAB_NUM);
    plate_tab0_screen_create(ui_tab[0]); 
    
    lv_timer = lv_timer_create(plate_tab0_refresh, 300, NULL);
    plate_group_select(0);
    
    return ui_tabview;
}


static void plate_tab0_screen_create(lv_obj_t *tab)
{

}

static void plate_tab0_refresh(lv_timer_t *timer)
{

}

static void set_value_event_cb(lv_event_t * e)
{

}

static void short_key_refresh(lv_obj_t *tab)
{

}

static void select_shortkey_event_cb(lv_event_t * e)
{

}

static void select_shortkey_back_event_cb(lv_event_t * e)
{
   
}

void plate_group_select(uint8_t id)
{
    lv_timer_pause(lv_timer);
    switch(id){
    case 0:  
        lv_timer_set_cb(lv_timer, plate_tab0_refresh);
        break;
    default:
        lv_timer_set_cb(lv_timer, NULL);
        break;
    }
    lv_timer_resume(lv_timer);
}
